<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>下拉列表的使用</title>
</head>
<body>
<div id="app">
    <div>
        <select name="fruit" id="fruit" v-model="fruit">
            <option value="苹果">苹果</option>
            <option value="芒果">芒果</option>
            <option value="西瓜">西瓜</option>
            <option value="香蕉">香蕉</option>
        </select>
        <h2>你喜欢的水果是：{{ fruit }}</h2>
    </div>

    <hr>
    <div>
        <select name="fruits" id="fruits" v-model="fruits" multiple>
            <option value="苹果">苹果</option>
            <option value="芒果">芒果</option>
            <option value="西瓜">西瓜</option>
            <option value="香蕉">香蕉</option>
        </select>
        <h2>你喜欢的水果是：{{ fruits }}</h2>
    </div>
</div>
<script type="module">
    import {createApp, ref} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {
            let fruit = ref(null)
            let fruits = ref([])
            return {
                fruit,
                fruits

            }
        }
    })

    app.mount("#app")
</script>
</body>
</html>